<template>
  <mid-dialog-box :title="title" @closeMidDialog="closeMidDialog">
    <div class="invitate">
      <div class="invitatecont" id="invitatecont">
        {{ content }}
      </div>
      <div class="copyinvitBtn" @click="copyText">
        复制邀请信息
      </div>
    </div>
  </mid-dialog-box>
</template>

<script>
// import { copyText } from '@/utils/copyText'
export default {
  data () {
    return {
      title: '邀请'
    }
  },
  computed: {
    content () {
      return this.$store.state.room.cfSponsorName + '发起的会议\n' + ' 会议号：' + this.$store.state.room.cfCode
    }
  },
  methods: {
    closeMidDialog () {
      this.$emit('closeInvitate')
    },
    copyText () {
      // copyText(this.content)
    }
  }
}
</script>

<style lang="scss" scoped>
.invitate {
  padding: 32px 30px 0;
  width: 100%;
  height: 100%;
  position: relative;
  .invitatecont {
    width: 100%;
    padding: 20px 40px;
    height: 412px;
    overflow: auto;
    border: 1px solid #ebedf3;
    color: #273553;
    font-size: 16px;
    white-space: pre;
  }
  .copyinvitBtn {
    cursor: pointer;
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 400;
    width: 148px;
    height: 42px;
    line-height: 42px;
    font-size: 16px;
    color: #fff;
    text-align: center;
    background: linear-gradient(225deg, #4750ec 0%, #6971fe 100%);
    border-radius: 5px;
  }
}
</style>
